//vuex的子模块，分行
export default {
  namespaced: true,
  state() {
    return {
      num: 100,
    };
  },
  getters: {
    num3(state) {
      return state.num * 3;
    },
  },
  mutations: {
    increment(state) {
      state.num++;
    },
    decrement(state, n) {
      state.num -= n;
    },
  },
};
